import ApiConfigDto from '@/core/framework/config/types/model/ApiConfigDto'

const apiConfigUtils = {
	generateDefaultApi: (prefixUrl: string) => {
		return {
			search: {
				uri: `${prefixUrl}/search`,
				mockUri: `/mock${prefixUrl}/search`,
				method: 'get',
				mock: undefined,
			} as ApiConfigDto,
			get: {
				uri: `${prefixUrl}/get`,
				mockUri: `/mock${prefixUrl}/get`,
				method: 'get',
				mock: undefined,
			} as ApiConfigDto,
			list: {
				uri: `${prefixUrl}/list`,
				mockUri: `/mock${prefixUrl}/list`,
				method: 'get',
				mock: undefined,
			} as ApiConfigDto,
			add: {
				uri: `${prefixUrl}/add`,
				mockUri: `/mock${prefixUrl}/add`,
				method: 'post',
				mock: undefined,
			} as ApiConfigDto,
			modifyNotNullField: {
				uri: `${prefixUrl}/modifyNotNullField`,
				mockUri: `/mock${prefixUrl}/modifyNotNullField`,
				method: 'post',
				mock: undefined,
			} as ApiConfigDto,
			removeLogic: {
				uri: `${prefixUrl}/removeLogic`,
				mockUri: `/mock${prefixUrl}/removeLogic`,
				method: 'post',
				mock: undefined,
			} as ApiConfigDto,
			remove: {
				uri: `${prefixUrl}/remove`,
				mockUri: `/mock${prefixUrl}/remove`,
				method: 'post',
				mock: undefined,
			} as ApiConfigDto,
		}
	},
}
export default apiConfigUtils
